home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / util / rexx / rxlistview15.lha / rxlistview / RXLISTVIEW.readme < prev   
Text File  |  1997-08-15  |  2KB  |  78 lines

  1.  
  2.     LISTVIEW.proc 1.5 - by Rolf Rotvel
  3.  
  4.     DESCRIPTION:
  5.     A listview procedure (Or rather collection of procedures) for your
  6.     Arexx scripts.
  7.  
  8.     INSTALLATION
  9.     Include it your Arexx scripts :-). 
  10.  
  11.     USAGE
  12.     num = listview(width, height, titletext)
  13.  
  14.     The stem variable, viewline, must have the following format:
  15.     viewline.0 = number of elements
  16.     viewline.1 = first element
  17.     viewline.2 = second element...
  18.  
  19.     Returns number of selected element or 0 if requester was cancelled.
  20.  
  21.     Have a look at util/rexx/cliped16.lha for an example of how to
  22.     incorporate it in a script.
  23.  
  24.     NAVIGATING LISTVIEW
  25.     Use cursor or shift-cursor keys to move up and down. 
  26.     Return selects an item and escape quits without selecting anything.
  27.  
  28.     If anyone has a way of detecting the use of ctrl as a qualifier then
  29.     please tell me. I'd really like to use ctrl-cursorup/down to move to the
  30.     top or bottom of the list.
  31.  
  32.     PROGRAMMING NOTES
  33.     It's fairly easy to make the listview respond to the HELP being pressed.
  34.     Change the main loop like this:
  35.  
  36.     do forever
  37.         oldrow = row ; oldvar = var
  38.         char = readch('listwin', 1)
  39.         select
  40.             when char = csi then do
  41.                 char = readch('listwin', 2)
  42.                 select
  43.                     when char = '?~' then do
  44.                         <help stuff>
  45.                     end
  46.                     ...
  47.  
  48.     When the listview window has been opened once by your script you cannot
  49.     change it's size when you open it again. That is, not unless you change
  50.     the line: 
  51.     if rxlv.init? ~= 1 then call init_rxlistview(argwidth, argheight)
  52.     to: 
  53.     call init_rxlistview(argwidth, argheight)
  54.     But this means that the initializing procedure will be called each time
  55.     the listview is opened, instead of just the first time.
  56.     
  57.     CREDITS
  58.     Thanks to Preben Nielsen for SCREENINFO() procedure.
  59.     And to Rick Younie's cy 1.1 for inspiration.
  60.            
  61.     COPYRIGHT
  62.     No copyright. Do whatever you want with this.    
  63.  
  64.     DISCLAIMER
  65.     It's your fault :-) 
  66.  
  67.     AUTHOR
  68.     Please send any comments or suggestions to me. I can be reached at 
  69.     2:238/38.2@fidonet or 39:140/110.2@amiganet. Email: rolfr@post4.tele.dk
  70.  
  71.     HISTORY:
  72.     1.4 - First release
  73.     1.5 - Moved all initialization stuff into seperate procedure called
  74.           only the first time listview is opened.
  75.           Added highlighting of selected line.
  76.           Various bugfixes and optimizations.
  77.  
  78.